#pragma once
#include <vector>

//#include "FEMathHCFamily.h"
template<class T>
class CFEMathCollectionLayerTemplate
{
public:
	CFEMathCollectionLayerTemplate(void):FEBase(0){};
	~CFEMathCollectionLayerTemplate(void){Free();};

	T *Add (T *FEMath)
	{
		v.push_back(FEMath);
		return FEMath;
	}

	T* Get (const DWORD &index = 0)
	{
		if (index >= v.size())
			return NULL;
		return v[index];
	}

	void Free ()
	{
		while (!v.empty())
		{
			delete v.back();
			v.pop_back();
		}
	}

	std::vector<T*> v;
	void *FEBase;
};

